home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 15
/
Amiga Plus Leser CD 15.iso
/
Online
/
newscoaster
/
gotoURL.rx
< prev
next >
Wrap
Text File
|
2002-03-12
|
1KB
|
57 lines
/* GotoURL.rx. Launches URLs in web browser */
/* Location of your browser (full path) */
browserPath='main:internet/voyager/v'
/* Your browser (must be 'Voyager', 'IBrowse' or 'AWeb')*/
browserName='Voyager'
/* Open URL in a new window? */
openInNewWindow=1
OPTIONS RESULTS
OPTIONS FAILAT 21
PARSE ARG URL
NAME = UPPER(browserName)
ports=SHOW('P')
SELECT
WHEN NAME='IBROWSE' THEN port='IBROWSE'
WHEN NAME='VOYAGER' THEN port='VOYAGER'
WHEN NAME='AWEB' THEN DO
PARSE VAR ports dummy 'AWEB.' portnr .
port='AWEB.' || portnr
END
OTHERWISE EXIT 10
END
ADDRESS COMMAND
IF ~SHOW('P',port) THEN DO
'RUN >NIL:' browserPath
'SYS:rexxc/WaitForPort' port
IF RC>0 THEN DO
ADDRESS NEWSCOASTER 'REQUEST "'browserName' not found.\nPlease install 'browserName' or change the script configuration!" "Okay!"'
EXIT 5
END
END
INTERPRET 'ADDRESS' port
SELECT
WHEN NAME='IBROWSE' THEN DO
IF openInNewWindow=1 THEN 'NewWindow 'url
ELSE 'GotoURL 'url
END
WHEN NAME='VOYAGER' THEN DO
IF openInNewWindow=1 THEN 'OpenURL 'url' NEWWIN'
ELSE 'OpenURL 'url
END
WHEN NAME='AWEB' THEN DO
IF openInNewWindow=1 THEN 'New 'url
ELSE 'Open 'url
END
END
EXIT